/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package turtle1;

import edu.turtlekit2.kernel.environment.Patch;
import edu.turtlekit2.kernel.environment.TurtleEnvironment;

/**
 *
 * @author shyzk_000
 */
public class CreationTortue {

    public static final int                     FEMME = 0;
    public static final int                     HOMME = 1;

    private static CreationTortue ct = null;
    int cpt = 0;

    public static CreationTortue getInstance(){
        if(ct == null){
            ct = new CreationTortue();
        }
        return ct;
    }

    public Humain creer(int type, int a, int b, TurtleEnvironment w, Patch pos){
        Humain t;
        switch(type){
            case FEMME:
                t = new Femme();
                break;
            default:
                t = new Homme();
                break;
        }
        t.initialisation(a, b, w, cpt, pos);
        t.setup();
        cpt++;

        return t;
    }
}
